package org.scs.carleton.ca.pgdt.core.internal.parser;

import java.util.List;

import org.scs.carleton.ca.pgdt.core.parser.nodes.IASTClause;
import org.scs.carleton.ca.pgdt.core.parser.nodes.IASTNode;

/**
 * Physical implementation of a clause.  External usage of this class is discouraged.
 * 
 * @author tessierj
 *
 */
public abstract class ASTClause extends ASTNode implements IASTClause {
	protected List<IASTNode> body;
	
	public ASTClause(ASTTranslationUnit translationUnit, int type, List<IASTNode> body) {
		super(translationUnit, type);
		this.body = body;
	}

	@Override
	public List<IASTNode> getBody() {
		return body;
	}

	@SuppressWarnings("nls")
	public String toString() {
		return "Clause " + getStartOffset() + " to " + getEndOffset();
	}
}
